﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Paginas/Page.Master" AutoEventWireup="true"
    CodeBehind="ListaProprietarios.aspx.cs" Inherits="SistemaCarros.Paginas.ListaProprietarios" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="divTitulo">
        Proprietários</div>
    <div id="divForm">
        <asp:UpdatePanel ID="updPanel" runat="server">
            <ContentTemplate>
                <asp:GridView ID="grdLista" runat="server" AutoGenerateColumns="false" EmptyDataText="Não há registros para exibir"
                    AllowPaging="true" AllowSorting="true" Width="100%" PageSize="20" OnPageIndexChanging="grdLista_PageIndexChanging">
                    <Columns>
                        <asp:BoundField DataField="Id" HeaderText="Id" />
                        <asp:BoundField DataField="Nome" HeaderText="Nome" />
                        <asp:BoundField DataField="Email" HeaderText="Email" />
                        <asp:BoundField DataField="Telefone" HeaderText="Telefone" />
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Button runat="server" Text="Editar" OnClick="btnEditar_Click" ID="btnEditar"
                                    CssClass="grid_button" ItemSelecionado='<%# Eval("Id") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Button runat="server" Text="Excluir" OnClick="btnExcluir_Click" ID="btnExcluir"
                                    CssClass="grid_button" OnClientClick="return fctValidarExcluir()" ItemSelecionado='<%# Eval("Id") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="grid_header" />
                    <AlternatingRowStyle CssClass="grid_alt_style" />
                    <RowStyle CssClass="grid_row_style" />
                </asp:GridView>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div id="divBotoes">
        <asp:Button ID="btnNovo" runat="server" Text="Novo" OnClick="btnNovo_Click" CssClass="button" />
    </div>
</asp:Content>
